/*
 * Copyright (C) 2021 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.to.aboomy.bannersample.indicator.magicindicator;

/**
 * 保存指示器标题的坐标
 *
 * @since 2020-09-29
 */
public class PositionData {
    private static final int NUM2 = 2;
    private int mLeft;
    private int mTop;
    private int mRight;
    private int mBottom;
    private int mContentLeft;
    private int mContentTop;
    private int mContentRight;
    private int mContentBottom;

    /**
     * getmLeft
     *
     * @return int
     */
    public int getmLeft() {
        return mLeft;
    }

    /**
     * setmLeft
     *
     * @param mleft mLeft
     */
    public void setmLeft(int mleft) {
        this.mLeft = mleft;
    }

    /**
     * getmTop
     *
     * @return mTop
     */
    public int getmTop() {
        return mTop;
    }

    /**
     * setmTop
     *
     * @param top mTop
     */
    public void setmTop(int top) {
        this.mTop = top;
    }

    /**
     * getmRight
     *
     * @return mRight
     */
    public int getmRight() {
        return mRight;
    }

    /**
     * setmRight
     *
     * @param right mRight
     */
    public void setmRight(int right) {
        this.mRight = right;
    }

    /**
     * getmBottom
     *
     * @return mBottom
     */
    public int getmBottom() {
        return mBottom;
    }

    /**
     * setmBottom
     *
     * @param bottom bottom
     */
    public void setmBottom(int bottom) {
        this.mBottom = bottom;
    }

    /**
     * getmContentLeft
     *
     * @return mContentLeft
     */
    public int getmContentLeft() {
        return mContentLeft;
    }

    /**
     * setmContentLeft
     *
     * @param contentLeft contentLeft
     */
    public void setmContentLeft(int contentLeft) {
        this.mContentLeft = contentLeft;
    }

    /**
     * getmContentTop
     *
     * @return mContentTop
     */
    public int getmContentTop() {
        return mContentTop;
    }

    /**
     * setmContentTop
     *
     * @param contentTop contentTop
     */
    public void setmContentTop(int contentTop) {
        this.mContentTop = contentTop;
    }

    /**
     * getmContentRight
     *
     * @return mContentRight
     */
    public int getmContentRight() {
        return mContentRight;
    }

    /**
     * setmContentRight
     *
     * @param contentRight contentRight
     */
    public void setmContentRight(int contentRight) {
        this.mContentRight = contentRight;
    }

    /**
     * getmContentBottom
     *
     * @return mContentBottom
     */
    public int getmContentBottom() {
        return mContentBottom;
    }

    /**
     * setmContentBottom
     *
     * @param contentBottom contentBottom
     */
    public void setmContentBottom(int contentBottom) {
        this.mContentBottom = contentBottom;
    }

    /**
     * 得到 width
     *
     * @return int
     */
    public int width() {
        return mRight - mLeft;
    }

    /**
     * 得到 height
     *
     * @return int
     */
    public int height() {
        return mBottom - mTop;
    }

    /**
     * 得到 contentWidth
     *
     * @return int
     */
    public int contentWidth() {
        return mContentRight - mContentLeft;
    }

    /**
     * 得到 contentHeight
     *
     * @return int
     */
    public int contentHeight() {
        return mContentBottom - mContentTop;
    }

    /**
     * 得到 horizontalCenter
     *
     * @return int
     */
    public int horizontalCenter() {
        return mLeft + width() / NUM2;
    }

    /**
     * 得到 verticalCenter
     *
     * @return int
     */
    public int verticalCenter() {
        return mTop + height() / NUM2;
    }
}
